import { createApp } from 'vue'
import App from '@/App.vue'

//引入element-plus插件与样式
import ElementPlus from 'element-plus'

//svg插件需要配置代码
import 'virtual:svg-icons-register'
//@ts-expect-error  ignorethisissue
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'element-plus/dist/index.css'

import router from './router'
import pinia from './store'
import gloaleCompoent from '@/components'

import '@/styles/index.scss'
import axios from 'axios'

const app = createApp(App)

//安装element-plus插件
app.use(ElementPlus, {
  locale: zhCn,
})

app.use(gloaleCompoent)
app.use(router)
app.use(pinia)

axios({
  url: '/api/user/login',
  method: 'post',
  data: {
    username: 'admin',
    password: '111111',
  },
})
import './permisstion'
import { isHasButton } from './directive/has'

isHasButton(app)
app.mount('#app')
